package com.imooc.util;

/**
 * @author Create By Liuqz
 * @date 2018/12/19 10:32
 */
public class PathUtil {
    private static String seperator = System.getProperty("file.seperator");

    public static String getImgeBasePath() {
        String os = System.getProperty("os.name");
        String basePath = "";

        if (os.toLowerCase().startsWith("win")) {
            basePath = "D:/projectdev/image/";
        } else {
            basePath = "/home/image/";
        }
        basePath = basePath.replace("/", seperator);
        return basePath;
    }

    public static String getShopImagePath(long shopId) {
        String imagePath = "upload/item/shop/" + shopId + "/";
        return imagePath.replace("/", seperator);
    }
}
